home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Dangling pointer?
- Date: Thu, 18 Apr 96 17:51:41 GMT
- Organization: none
- Message-ID: <829849901snz@genesis.demon.co.uk>
- References: <4l0r4b$jte@dewey.csun.edu> <fcusack-1604962132440001@mudskipper.cac.psu.edu> <4l33dcINN8ms@keats.ugrad.cs.ubc.ca>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4l33dcINN8ms@keats.ugrad.cs.ubc.ca>
- c2a192@ugrad.cs.ubc.ca "Kazimir Kylheku" writes:
-
- >In article <fcusack-1604962132440001@mudskipper.cac.psu.edu>,
- >frank. <fcusack@tdx.org> wrote:
- >>In article <4l0r4b$jte@dewey.csun.edu>, kc44097@csun.edu (chen) wrote:
- >>
- >>> What is "dangling pointer",can someone give me a defination and example?
- >>> Please e-mail me kc44097@huey.csun.edu
- >>>
- >>
- >>It's the complement of a split infinitive. :)
- >
- >Actually it isn't. A there is nothing wrong with putting words between the "to"
- >and the verb.
-
- It depends.
-
- >In fact, it's the only place an adjective can go:
-
- ???
-
- > "I want to quickly get this message out"
-
- Quick is an adjective, quickly is an adverb.
-
- >is perfectly grammatical.
-
- It depends on the grammar rules you are using.
-
- >It would be ungrammatical to put the "quickly" in
- >front of the "to" or after the "get". You could rewrite the sentence as "I want
- >to get this message out quickly", but that is a transformation.
-
- In what sense? Certainly it's putting the word in a different place but you'd
- have to do that with any of the alternatives. It certainly shows that quickly
- *can* go somewhere else.
-
- >Linguists take
- >the view that the syntax of the language is defined by how the speaker's use
- >it, not by the utterly empirically inadequate rules of grammar would have them
- >speak or write.
-
- The rules for prose, or for that matter poetry can have significant
- differences to those of spoken language. They tend to be more formal, or
- perhaps spoken langage is just much looser in the application of the rules.
- French has different verb forms for written narrative.
-
- >Most grammar texts don't even recognize the recursively
- >generative nature of sentence structure. So the next time someone criticizes
- >your infinitive, tell them to split!
-
- It depends on what you're writing. Usenet tends to be more interactive,
- almost like a spoken language so I'd agree with you in that context.
-
- >A somewhat better analogy to a dangling C pointer is the use of a reference
- >that is unresolved. For example, the use of a word like "he" or "it" without an
- >antecedent. That's not a syntactic error, of course---but neither is a dangling
- >pointer in C, and that's why any grammar error (legitimate or not) is a bad
- >analogy for it.
-
- So you're talking about a pointer that doesn't hold a meaningful value.
- In C that can happen for example when the object being pointed to is
- destroyed e.g. after a call to free or when you reach the end of a
- automatic variable's scope.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-